sm2:
	echo hello | /opt/tongsuo/bin/tongsuo pkeyutl -encrypt -inkey ./data/public.pem -pubin |\
	/opt/tongsuo/bin/tongsuo pkeyutl -decrypt -inkey ./data/private.pem

sm4:
	echo hello | /opt/tongsuo/bin/tongsuo enc -K "3f342e9d67d6ce7be701756af7bac8f2" -e -sm4-ofb -iv "3f342e9d67d6ce7be701756af7bac8f2" -nosalt |\
	/opt/tongsuo/bin/tongsuo enc -K "3f342e9d67d6ce7be701756af7bac8f2" -d -sm4-ofb -iv "3f342e9d67d6ce7be701756af7bac8f2" -nosalt

sm3:
	echo hello | /opt/tongsuo/bin/tongsuo dgst -hmac "PlatformKEY" -sm3 -binary

gen:
	/opt/tongsuo/bin/tongsuo ecparam -genkey -name SM2 -out ./data/private.pem
	/opt/tongsuo/bin/tongsuo ec -in ./data/private.pem -pubout -out ./data/public.pem

clean:
	rm -rf ./data/private.pem
	rm -rf ./data/public.pem

build:
	go build -o tongguo-labs
